package com.zhaorui.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName activity_win_rule
 */
@TableName(value ="activity_win_rule")
@Data
public class ActivityWinRule implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Integer id;

    /**
     * 活动id
     */
    private Integer titleid;

    /**
     * 等级id
     */
    private Integer levelid;

    /**
     * 中奖次数
     */
    private Integer hitCount;

    /**
     * 创建配置时间
     */
    private Date createtime;

    /**
     * 备注
     */
    private String rem1;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        ActivityWinRule other = (ActivityWinRule) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTitleid() == null ? other.getTitleid() == null : this.getTitleid().equals(other.getTitleid()))
            && (this.getLevelid() == null ? other.getLevelid() == null : this.getLevelid().equals(other.getLevelid()))
            && (this.getHitCount() == null ? other.getHitCount() == null : this.getHitCount().equals(other.getHitCount()))
            && (this.getCreatetime() == null ? other.getCreatetime() == null : this.getCreatetime().equals(other.getCreatetime()))
            && (this.getRem1() == null ? other.getRem1() == null : this.getRem1().equals(other.getRem1()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTitleid() == null) ? 0 : getTitleid().hashCode());
        result = prime * result + ((getLevelid() == null) ? 0 : getLevelid().hashCode());
        result = prime * result + ((getHitCount() == null) ? 0 : getHitCount().hashCode());
        result = prime * result + ((getCreatetime() == null) ? 0 : getCreatetime().hashCode());
        result = prime * result + ((getRem1() == null) ? 0 : getRem1().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", titleid=").append(titleid);
        sb.append(", levelid=").append(levelid);
        sb.append(", hitCount=").append(hitCount);
        sb.append(", createtime=").append(createtime);
        sb.append(", rem1=").append(rem1);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}